package org.hoyi.microservice.routes.model;

/**
 * 服务供应器类，简称供应器。
 * @author sam
 *
 */
public class HoyiProvider {

	String Host;
	
	String Port;
	
	String ServiceID;
	
	String ServiceUUID;
	
	String ParentServiceId;
	/**
	 * 负载均衡时候的权重值。
	 */
	String Weight= "-1";

	/**
	 * 
	 * 
	 * @param _host  
	 * @param _port
	 * @param _serviceid
	 * @param _serviceuuid
	 */
    public HoyiProvider(String _host, String _port, String _serviceid, String _serviceuuid) {
		this.setHost(_host);
		this.setPort(_port);
		this.setServiceID(_serviceid);
		this.setServiceUUID(_serviceuuid);
	}
	
	public String getHost() {
		return Host;
	}

	public void setHost(String host) {
		Host = host;
	}

	public String getPort() {
		return Port;
	}

	public void setPort(String port) {
		Port = port;
	}

	public String getServiceID() {
		return ServiceID;
	}

	public void setServiceID(String serviceID) {
		ServiceID = serviceID;
	}

	public String getServiceUUID() {
		return ServiceUUID;
	}

	public void setServiceUUID(String serviceUUID) {
		ServiceUUID = serviceUUID;
	}
	
	public String getParentServiceId() {
		return ParentServiceId;
	}

	public void setParentServiceId(String parentServiceId) {
		ParentServiceId = parentServiceId;
	}

	public String getWeight() {
		return Weight;
	}

	public void setWeight(String weight) {
		Weight = weight;
	}

	@Override
	public String toString() {
		return "Host:&nbsp;" + Host + "\r\n&nbsp;&nbsp;&nbsp;" +
				"Port:&nbsp;" + Port + "\r\n&nbsp;&nbsp;&nbsp;" +
				"ServiceId:&nbsp;" + ServiceID + "\r\n&nbsp;&nbsp;&nbsp;" +
				"UUID:&nbsp;" + ServiceUUID +
				"ParentServiceId:&nbsp;" + ParentServiceId +
				"Weight:&nbsp;" + Weight + "\r\n&nbsp;&nbsp;&nbsp;";
	}
	
	
}
